<?php
/*************************************************************************
Class ProductPromotionInfo
----------------------------------------------------------------
AvaCMS Project
Company: Avasoft Co., Ltd                                  
Name: Tran Thi Kim Que
Last updated: 08/03/2011
**************************************************************************/
class ProductPromotionInfo {
	var $id;			# id product promotion
	var $productid;		# productid
	var $name;			# name
	var $content;		# content
	var $date_begin;	# date_begin
	var $date_end;		# date_end
	var $status;		# status

	# Constructor
	function ProductPromotionInfo($productid, $name, $content, $date_begin, $date_end ,$status, $id = 0)
	{
		$this->productid = $productid;
		$this->name = $name;
		$this->content = stripslashes($content);
		$this->date_begin = $date_begin;
		$this->date_end = $date_end;
		$this->status = $status;
		$this->id = $id;		
	}
	function getProductId() {
		return $this->productid;
	}
	function setProductId($nValue) {
		$this->productid=$nValue;
	}	
	function getId() {
		return $this->id;
	}	
	function setId($nValue) {
		$this->id=$nValue;
	}
	function getName() {
		return $this->name;
	}	
	function setName($nValue) {
		$this->name=$nValue;
	}
	function setContent($nValue) {
		$this->content=$nValue;
	}
	function getContent() {
		return $this->content;
	}	
	function setDateBegin($nValue) {
		$this->date_begin=$nValue;
	}
	function getDateBegin() {
		return $this->date_begin;
	}
	function setDateEnd($nValue) {
		$this->date_end=$nValue;
	}
	function getDateEnd() {
		return $this->date_end;
	}		
	function getStatus() {
		return $this->status;
	}
	function setStatus($nValue) {
		$this->status = $nValue;
	}
	function getStatusText() {
		global $amessages;
		return $amessages['status_text'][$this->status];
	}
	function isEnabled() {
		return ($this->status == 1?1:0);
	}
	function isDeleted() {
		return ($this->status == 2?1:0);
	}
	function isDisabled() {
		return ($this->status == 0?1:0);
	}
}
?>